home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group94b.txt / 000039_icon-group-sender _Sun Sep 4 22:02:07 1994.msg < prev    next >
Internet Message Format  |  1995-02-09  |  4KB

  1. Received: by cheltenham.cs.arizona.edu; Sun, 4 Sep 1994 15:28:08 MST
  2. To: icon-group-l@cs.arizona.edu
  3. Date: Sun, 4 Sep 1994 22:02:07 GMT
  4. From: goer@quads.uchicago.edu (Richard L. Goerwitz)
  5. Message-Id: <1994Sep4.220207.10360@midway.uchicago.edu>
  6. Organization: University of Chicago
  7. Sender: icon-group-request@cs.arizona.edu
  8. References: <33vlde$95i@ios.com>, <1994Aug31.140111.22639@midway.uchicago.edu>, <347vun$qkb@ios.com>
  9. Reply-To: goer@midway.uchicago.edu
  10. Subject: Re: Icon - still alive??
  11. Errors-To: icon-group-errors@cs.arizona.edu
  12.  
  13. In article <347vun$qkb@ios.com> nmw@ios.com (Nick Williams) writes:
  14. >
  15. >What was Icon intended for then? Is it supposed to allow highly portable
  16. >programming by putting huge restrictions on what Icon programmers can
  17. >do? I bet not (why else would there be a preprocessor?, or &features for
  18. >that matter?). Frankly, Icon needs better access to system dependent
  19. >features...
  20.  
  21. Your opinion is a valid one, and shared by others.  I just don't happen
  22. to agree.  We are going in circles here, in a sense, because my answer
  23. to what you are saying now is the same answer I gave before:  If you need
  24. system-dependent features, improve Icon's access to facilities that deal
  25. with them.  To extend Icon here and there to make it more PERL-like or
  26. more C-like will fritter away the language.
  27.  
  28. As I pointed out before, Icon has an improved C calling interface that
  29. allows you to dynamically load functions into the run-time system.  So
  30. all you have to do to call a C function is to put it into a dynamically
  31. loadable library, and load it from your Icon program.  No recompilation
  32. of the Icon source is needed.  I like this.  There are even some exam-
  33. ples in the new documentation for Icon 9.0.
  34.  
  35. >Forcing programmers to go hack the RTL code from which icont and iconc
  36. >are made or to write C function wrappers to system routines (plus Icon
  37. >wrappers as well), then relink the relevant libraries and executables
  38. >(or use loadfunc()) just to make them think twice before they use a
  39. >system dependent function is CRAZY!
  40.  
  41. Again, I just don't agree.  If loadfunc() isn't elegant enough, then an
  42. improved interface should be developed at some point.  In theory it is
  43. nice to have a language be all things to all people.  But once a lang-
  44. uage comits to this philosophy, it's hard to know when to stop.  And the
  45. result can be ugly and messy.  Far uglier and messier than loadfunc() -
  46. for which there is perfectly good sample code in the Icon docs.
  47.  
  48. >Indeed, and why are they putting in graphics extensions? because they
  49. >are *useful* to have (though _I_ don't use them often); the same would
  50. >apply to adding fork(), exec() and the like (system() is portable, but
  51. >limiting, not to mention dangerous).
  52.  
  53. Here's a prime example.  Creation of a new process in Unix is not atomic.
  54. You have to copy the current process, then overlay it.  This is pretty
  55. system dependent.  You mentioned setenv() above.  I don't believe that
  56. the Mac has environment variables per se.  Getenv() is marginally useful
  57. for passing information about the environment to Icon (e.g. if you want
  58. to know what TERM type you have under Unix).  I've never needed setenv()
  59. within Icon, myself, though.  Not so say someone wouldn't.  But then I
  60. could see how almost every platform-specific facility might be useful
  61. at one time or another.  That doesn't mean I want to see them as part
  62. of the core Icon language definition.
  63.  
  64. To back off a moment, let me just repeat that your opinion is perfectly
  65. reasonable, and I'm sure many others share it.  There's another side,
  66. though, and that's the one I happen to be on.
  67.  
  68. -- 
  69.  
  70.    -Richard L. Goerwitz              goer%midway@uchicago.bitnet
  71.    goer@midway.uchicago.edu          rutgers!oddjob!ellis!goer
  72.